package com.weimob.mcloud.wechatwork.customer.service.user.enums;


import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

public enum BizTypeEnum {
	NORMAL(0, "普通"),
	PROMOTION(1, "满减满折"),
	FREEFREIGHT(2, "满包邮"),
	DISCOUNT(3, "折扣"),
	BARGAIN(4, "砍价"),
	GROUPON(5, "拼团"),
	COUPON(6, "优惠券"),
	COUPONCODE(9, "优惠码"),
	PRIVILEGE_PRICE(10, "特权价"),
	PAYMENT_PROMOTION(11, "支付推广"),
	NYNJ(12, "N元N件"),
	COMBINATION_BUY(13, "优惠套装"),
	REDEMPTION(14, "满包邮"),
	FULL_SUBTRACT(15, "满减"),
	FULL_DISCOUNT(16, "满折"),
	MEMBERSHIP(17, "会员"),
	RESERVE(18, "预约到店"),
	COMMUNITY_GROUPON(19, "社区团购"),
	LIMIT_QUANTITY(20, "限量抢购"),
	GIFT_CARD(21, "礼品卡"),
	COLLOCATION(22, "商品搭配"),
	ADVERTISEMENT(23, "广告推广"),
	DEPOSIT_EXPANSION(24, "定金膨胀"),
	GRADED_PRICE(25, "阶梯价"),
	WATERMARK_MARKETING(26, "水印活动"),
	CONSUME(27, "消费有礼"),
	ENTIRE_ORDER_DISCOUNT	(28, "整单优惠"),
	LOOSE_CHANGE_DISCOUNT	(29, "抹零"),
	LIMITED_SNATCH_COUPON	(30, "限时抢券"),
	LIVE_BARGAIN(31, "直播砍价"),
	GIFT_MARKETING(32, "满赠"),
	WECHAT_LIVE(33, "微信直播"),
	XJXZ(37, "第X件X折");

	@Getter
	private int code;

	@Getter
	private String name;

	BizTypeEnum(int code, String name) {
		this.code = code;
		this.name = name;
	}

	private static Map<Integer, String> bizTypeMap = new HashMap<>();
	static {
		for (BizTypeEnum bizInfo : values()) {
			bizTypeMap.put(bizInfo.code, bizInfo.name);
		}
	}

	public static String transferToName(Integer code) {
		return bizTypeMap.get(code);
	}

}
